import VueRouter from 'vue-router'

import Home from './components/tabbar/home.vue'
import Member from './components/tabbar/member.vue'
import Shopcar from './components/tabbar/shopcar.vue'
import Search from './components/tabbar/search.vue'

import  Newslist from './components/News/newslist.vue'
import Photolist from './components/photos/photolist.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:Home},
    {path:'/member',component:Member},
    {path:'/shopcar',component:Shopcar},
    {path:'/search',component:Search},
    {path:'/home/newslist',component:Newslist},
    {path:'/home/photolist',component:Photolist}
  ],
  linkActiveClass:'mui-active' //router-link-active
})

// 把路由对象暴露出去
export default router